package com.ncucoder.soms.dao;

import com.ncucoder.soms.entity.Provider;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author <a href="https://www.ncucoder.com">hsowan</a>
 * @date 2019-07-22
 */
public interface ProviderMapper {
    /**
     *
     * @param provider
     * @return
     */
    int insertProvider(Provider provider);

    /**
     *
     * @param beginIndex
     * @param pageSize
     * @return
     */
    List<Provider> selectProviders(@Param("beginIndex") int beginIndex, @Param("pageSize") int pageSize);

    /**
     *
     * @return
     */
    int countProviders();

    /**
     *
     * @param id
     * @return
     */
    int deleteProviderById(@Param("id") Long id);

    /**
     * 
     * @param id
     * @return
     */
    Provider selectProviderById(@Param("id") Long id);

    /**
     *
     * @param provider
     * @return
     */
    int updateProvider(Provider provider);

    /**
     *
     * @return
     */
    List<Provider> listAllProviderNames();
}